function getNum(key) {
    var result = 0,

        i, j, m,

        items, n = [];

    //检查是否已计算过
    if (typeof myData[key] != 'undefined') {
        return myData[key];
    }

    items = key.split(";");

    //已选择数据是最小路径，直接从已端数据获取
    if (items.length === keys.length) {
        return data[key] ? data[key].count : 0;
    }

    //拼接子串
    for (i = 0; i < keys.length; i++) {
        for (j = 0; j < keys[i].length && items.length > 0; j++) {
            if (keys[i][j] == items[0]) {
                break;
            }
        }

        if (j < keys[i].length && items.length > 0) {
            //找到该项，跳过
            n.push(items.shift());
        } else {
            //分解求值
            for (m = 0; m < keys[i].length; m++) {
                result += getNum(n.concat(keys[i][m], items).join(";"));
            }
            break;
        }
    }

    //缓存
    myData[key] = result;
    return result;
}